ActionController::Routing::Routes.draw do |map|
  # The priority is based upon order of creation: first created -> highest priority.
  
  # Sample of regular route:
  # map.connect 'products/:id', :controller => 'catalog', :action => 'view'
  # Keep in mind you can assign values other than :controller and :action

  # Sample of named route:
  # map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
  # This route can be invoked with purchase_url(:id => product.id)

  # You can have the root of your site routed by hooking up '' 
  # -- just remember to delete public/index.html.
  # map.connect '', :controller => "welcome"

  # Allow downloading Web Service WSDL as a file with an extension
  # instead of a file named 'wsdl'
  map.site_index '/site_index',                 :controller => 'cinemas', :action => 'site_index'
  map.admin_index '/admin_index',               :controller => 'cinemas', :action => 'admin_index'
  
  map.resources :users
  map.login    '/session/new',                  :controller => 'session', :action => 'new'
  map.logout   '/session/destroy',              :controller => 'session', :action => 'destroy'
  map.current_user '/current_user',             :controller => 'users',   :action => 'show'
  
  map.resource :session
  map.simple_captcha '/simple_captcha/:action', :controller => 'simple_captcha'
  map.show_simple_captcha '/show_simple_captcha', :controller => 'session', :action => 'show_captcha'
  
  map.set_role '/set_role/:id/:role_id',        :controller => 'roles',    :action => 'update'
  map.resources :roles  
  map.resources :movies
  map.on_shows_id '/on_shows/:id',              :controller => 'movies',   :action => 'show' , :movies => 'on_show'
  
  
  map.resources :admin_movies
  map.on_show '/on_show',                       :controller => 'admin_movies',   :action => 'index', :movies => 'on_show'
  map.off_show '/comming_soon',                 :controller => 'admin_movies',   :cction => 'index', :movies => 'off_show'  
  map.set_as_cover '/set_as_cover',             :controller => 'movie_pics',     :cction => 'set_as_cover'
  
  map.resources :movie_pics
  
  map.resources :movie_houses
  map.resources :cinemas
  map.resources :plays
  map.resources :replies
end
